package kmu.lwl.entiy;

import java.util.Objects;

public class Course {
    private String id;
    private String name;
    private Short semester;
    private Integer period;
    private Integer credit;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Short getSemester() {
        return semester;
    }

    public void setSemester(Short semester) {
        this.semester = semester;
    }

    public Integer getPeriod() {
        return period;
    }

    public void setPeriod(Integer period) {
        this.period = period;
    }

    public Integer getCredit() {
        return credit;
    }

    public void setCredit(Integer credit) {
        this.credit = credit;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Course course = (Course) o;
        return Objects.equals(id, course.id) &&
                Objects.equals(name, course.name) &&
                Objects.equals(semester, course.semester) &&
                Objects.equals(period, course.period) &&
                Objects.equals(credit, course.credit);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, name, semester, period, credit);
    }
}
